package org.eddycar.jproyeddycar.comun.vistas;

import java.util.ArrayList;
import java.util.List;
import javax.swing.JOptionPane;
import org.eddycar.jproyeddycar.comun.modelo.*;
import org.eddycar.jproyeddycar.comun.negocio.AdministrarClienteUCC;
import org.jdesktop.observablecollections.ObservableList;

public class BuscarCliente extends javax.swing.JDialog {

    boolean bandera = false;
    AdministrarClienteUCC clienteUCC = new AdministrarClienteUCC();

    public BuscarCliente() {
        initComponents();
        setLocationRelativeTo(this);
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

        buttonGroup1 = new javax.swing.ButtonGroup();
        vistaCliente = new javax.swing.JDialog();
        panelImage2 = new org.edisoncor.gui.panel.PanelImage();
        panelRound2 = new org.edisoncor.gui.panel.PanelRound();
        spEdad = new javax.swing.JSpinner();
        txttelCel = new javax.swing.JFormattedTextField();
        lblTelfCel = new javax.swing.JLabel();
        txtTelDom = new javax.swing.JFormattedTextField();
        cbEstadoCivil = new javax.swing.JComboBox();
        lblApellido1 = new javax.swing.JLabel();
        txtDirecTrab = new javax.swing.JTextField();
        txtDirec = new javax.swing.JTextField();
        lblDireccion = new javax.swing.JLabel();
        lblDirTrab = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        lblCedulaNuevo = new javax.swing.JLabel();
        lblNombre6 = new javax.swing.JLabel();
        jLabel26 = new javax.swing.JLabel();
        lblNombre = new javax.swing.JLabel();
        jLabel27 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        lblApellido = new javax.swing.JLabel();
        lblTelefonoDom = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        txtNombre = new javax.swing.JTextField();
        txtApellido = new javax.swing.JTextField();
        jLabel25 = new javax.swing.JLabel();
        txtCedulaNuevo = new javax.swing.JFormattedTextField();
        jLabel15 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        btnConyuge = new javax.swing.JButton();
        btnCancelarCliente = new javax.swing.JButton();
        panelRound3 = new org.edisoncor.gui.panel.PanelRound();
        cbxFormaPago = new javax.swing.JComboBox();
        lblNombre1 = new javax.swing.JLabel();
        cbxTipoCliente = new javax.swing.JComboBox();
        lblNombre7 = new javax.swing.JLabel();
        btnGarante = new javax.swing.JButton();
        btnGuardarCliente = new javax.swing.JButton();
        lblNombre8 = new javax.swing.JLabel();
        lblNombre9 = new javax.swing.JLabel();
        vistaConyuge = new javax.swing.JDialog();
        panelImage3 = new org.edisoncor.gui.panel.PanelImage();
        panelRound4 = new org.edisoncor.gui.panel.PanelRound();
        spEdadC = new javax.swing.JSpinner();
        txttelCelC = new javax.swing.JFormattedTextField();
        lblTelfCel1 = new javax.swing.JLabel();
        txtTelDomC = new javax.swing.JFormattedTextField();
        cbEstadoCivilC = new javax.swing.JComboBox();
        lblApellido2 = new javax.swing.JLabel();
        txtDirecTrabC = new javax.swing.JTextField();
        txtDirecC = new javax.swing.JTextField();
        lblDireccion1 = new javax.swing.JLabel();
        lblDirTrab1 = new javax.swing.JLabel();
        lblCedulaNuevo1 = new javax.swing.JLabel();
        lblNombre10 = new javax.swing.JLabel();
        lblNombre2 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        lblApellido3 = new javax.swing.JLabel();
        lblTelefonoDom1 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        txtNombreC = new javax.swing.JTextField();
        txtApellidoC = new javax.swing.JTextField();
        jLabel32 = new javax.swing.JLabel();
        txtCedulaNuevoC = new javax.swing.JFormattedTextField();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        btnCancelarConyuge = new javax.swing.JButton();
        btnGuardarConyuge = new javax.swing.JButton();
        lblNombre13 = new javax.swing.JLabel();
        vistaGarante = new javax.swing.JDialog();
        panelImage4 = new org.edisoncor.gui.panel.PanelImage();
        panelRound5 = new org.edisoncor.gui.panel.PanelRound();
        spEdadG = new javax.swing.JSpinner();
        txttelCelG = new javax.swing.JFormattedTextField();
        lblTelfCel2 = new javax.swing.JLabel();
        txtTelDomG = new javax.swing.JFormattedTextField();
        cbEstadoCivilG = new javax.swing.JComboBox();
        lblApellido4 = new javax.swing.JLabel();
        txtDirecTrabG = new javax.swing.JTextField();
        txtDirecG = new javax.swing.JTextField();
        lblDireccion2 = new javax.swing.JLabel();
        lblDirTrab2 = new javax.swing.JLabel();
        lblCedulaNuevo2 = new javax.swing.JLabel();
        lblNombre11 = new javax.swing.JLabel();
        jLabel34 = new javax.swing.JLabel();
        lblNombre3 = new javax.swing.JLabel();
        jLabel35 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        lblApellido5 = new javax.swing.JLabel();
        lblTelefonoDom2 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        jLabel24 = new javax.swing.JLabel();
        txtNombreG = new javax.swing.JTextField();
        txtApellidoG = new javax.swing.JTextField();
        jLabel36 = new javax.swing.JLabel();
        txtCedulaG = new javax.swing.JFormattedTextField();
        jLabel37 = new javax.swing.JLabel();
        jLabel38 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        btnCancelarGarante = new javax.swing.JButton();
        btnGuardarGarante = new javax.swing.JButton();
        lblNombre14 = new javax.swing.JLabel();
        panelImage1 = new org.edisoncor.gui.panel.PanelImage();
        jLabel21 = new javax.swing.JLabel();
        panelRound1 = new org.edisoncor.gui.panel.PanelRound();
        jLabel1 = new javax.swing.JLabel();
        txtCriterio = new javax.swing.JTextField();
        cbxTipo = new javax.swing.JComboBox();
        btnBuscarCliente = new javax.swing.JButton();
        btnLimpiar = new javax.swing.JButton();
        panelRect1 = new org.edisoncor.gui.panel.PanelRect();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblCliente = new javax.swing.JTable();
        btnEditar = new javax.swing.JButton();
        btnNuevo = new javax.swing.JButton();
        btnCerrarVista = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();

        vistaCliente.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        vistaCliente.setTitle("Editar Cliente");
        vistaCliente.setAlwaysOnTop(true);
        vistaCliente.setMinimumSize(new java.awt.Dimension(604, 568));
        vistaCliente.setResizable(false);

        panelImage2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/eddycar/jproyeddycar/negocio/Imagenes/pantalla.jpg"))); // NOI18N

        spEdad.setOpaque(false);
        spEdad.setValue(18);

        txttelCel.setDisabledTextColor(new java.awt.Color(0, 0, 0));

        lblTelfCel.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblTelfCel.setForeground(new java.awt.Color(255, 255, 255));
        lblTelfCel.setText("Celular:");

        txtTelDom.setDisabledTextColor(new java.awt.Color(0, 0, 0));

        cbEstadoCivil.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "SOLTERO", "CASADO" }));
        cbEstadoCivil.setOpaque(false);
        cbEstadoCivil.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cbEstadoCivilActionPerformed(evt);
            }
        });

        lblApellido1.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblApellido1.setForeground(new java.awt.Color(255, 255, 255));
        lblApellido1.setText("Edad:");

        txtDirecTrab.setDisabledTextColor(new java.awt.Color(0, 0, 0));

        txtDirec.setDisabledTextColor(new java.awt.Color(0, 0, 0));

        lblDireccion.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblDireccion.setForeground(new java.awt.Color(254, 254, 254));
        lblDireccion.setText("Dirección:");

        lblDirTrab.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblDirTrab.setForeground(new java.awt.Color(254, 254, 254));
        lblDirTrab.setText("Dir. Lugar de Trabajo:");

        jLabel28.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel28.setForeground(new java.awt.Color(255, 0, 0));
        jLabel28.setText("*");

        lblCedulaNuevo.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblCedulaNuevo.setForeground(new java.awt.Color(255, 255, 255));
        lblCedulaNuevo.setText("Cédula:");

        lblNombre6.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblNombre6.setForeground(new java.awt.Color(255, 255, 255));
        lblNombre6.setText("Nombres:");

        jLabel26.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel26.setForeground(new java.awt.Color(255, 0, 0));
        jLabel26.setText("*");

        lblNombre.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblNombre.setForeground(new java.awt.Color(255, 255, 255));
        lblNombre.setText("Estado Civil:");

        jLabel27.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel27.setForeground(new java.awt.Color(255, 0, 0));
        jLabel27.setText("*");

        jLabel16.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel16.setForeground(new java.awt.Color(255, 0, 0));
        jLabel16.setText("*");

        lblApellido.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblApellido.setForeground(new java.awt.Color(255, 255, 255));
        lblApellido.setText("Apellidos:");

        lblTelefonoDom.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblTelefonoDom.setForeground(new java.awt.Color(255, 255, 255));
        lblTelefonoDom.setText("Tel. Domicilio:");

        jLabel10.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel10.setForeground(new java.awt.Color(255, 0, 0));
        jLabel10.setText("*");

        jLabel9.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel9.setForeground(new java.awt.Color(255, 0, 0));
        jLabel9.setText("*");

        txtApellido.setDisabledTextColor(new java.awt.Color(0, 0, 0));

        jLabel25.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel25.setForeground(new java.awt.Color(255, 0, 0));
        jLabel25.setText("*");

        txtCedulaNuevo.setText("0         ");

        jLabel15.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel15.setForeground(new java.awt.Color(255, 0, 0));
        jLabel15.setText("*");

        jLabel13.setFont(new java.awt.Font("Flubber", 1, 11));
        jLabel13.setForeground(new java.awt.Color(255, 255, 255));
        jLabel13.setText("Campos");

        jLabel14.setFont(new java.awt.Font("Flubber", 1, 11));
        jLabel14.setForeground(new java.awt.Color(255, 255, 255));
        jLabel14.setText("obligatorios.");

        btnConyuge.setText("Cónyuge");
        btnConyuge.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnConyugeActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panelRound2Layout = new javax.swing.GroupLayout(panelRound2);
        panelRound2.setLayout(panelRound2Layout);
        panelRound2Layout.setHorizontalGroup(
            panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelRound2Layout.createSequentialGroup()
                .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelRound2Layout.createSequentialGroup()
                        .addGap(118, 118, 118)
                        .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblCedulaNuevo)
                            .addComponent(lblNombre6)
                            .addComponent(lblApellido)
                            .addComponent(lblNombre))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(panelRound2Layout.createSequentialGroup()
                                .addComponent(txtCedulaNuevo, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(panelRound2Layout.createSequentialGroup()
                                .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panelRound2Layout.createSequentialGroup()
                                        .addComponent(cbEstadoCivil, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(2, 2, 2)
                                        .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(btnConyuge, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE))
                                    .addComponent(txtApellido, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 264, Short.MAX_VALUE)
                                    .addComponent(txtNombre, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 264, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel25, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                    .addGroup(panelRound2Layout.createSequentialGroup()
                        .addGap(57, 57, 57)
                        .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(panelRound2Layout.createSequentialGroup()
                                .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(lblDireccion)
                                    .addComponent(lblTelefonoDom)
                                    .addComponent(lblDirTrab))
                                .addGap(2, 2, 2))
                            .addComponent(lblTelfCel)
                            .addComponent(lblApellido1))
                        .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(panelRound2Layout.createSequentialGroup()
                                .addComponent(jLabel15)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel13)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel14))
                            .addGroup(panelRound2Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(spEdad, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(2, 2, 2)
                                .addComponent(jLabel28, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(panelRound2Layout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(panelRound2Layout.createSequentialGroup()
                                        .addComponent(txtDirecTrab, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(2, 2, 2)
                                        .addComponent(jLabel27, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(panelRound2Layout.createSequentialGroup()
                                        .addComponent(txtDirec, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(2, 2, 2)
                                        .addComponent(jLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                        .addComponent(txtTelDom)
                                        .addComponent(txttelCel, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE)))))))
                .addContainerGap(89, Short.MAX_VALUE))
        );
        panelRound2Layout.setVerticalGroup(
            panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelRound2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblCedulaNuevo)
                    .addComponent(txtCedulaNuevo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel16))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel25)
                    .addGroup(panelRound2Layout.createSequentialGroup()
                        .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblNombre6))
                        .addGap(6, 6, 6)
                        .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtApellido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblApellido)
                            .addComponent(jLabel10))
                        .addGap(7, 7, 7)
                        .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cbEstadoCivil, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblNombre)
                            .addComponent(jLabel9)
                            .addComponent(btnConyuge, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblApellido1)
                            .addComponent(spEdad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel28))
                        .addGap(9, 9, 9)
                        .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblTelfCel)
                            .addComponent(txttelCel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblTelefonoDom)
                            .addComponent(txtTelDom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblDireccion)
                            .addComponent(jLabel26)
                            .addComponent(txtDirec, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel27)
                                .addComponent(txtDirecTrab, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(lblDirTrab))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(panelRound2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel14)
                            .addComponent(jLabel13)
                            .addComponent(jLabel15))
                        .addGap(63, 63, 63))))
        );

        btnCancelarCliente.setText("Cancelar");
        btnCancelarCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCancelarClienteActionPerformed(evt);
            }
        });

        cbxFormaPago.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Financiamiento", "Contado" }));
        cbxFormaPago.setOpaque(false);
        cbxFormaPago.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cbxFormaPagoActionPerformed(evt);
            }
        });

        lblNombre1.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblNombre1.setForeground(new java.awt.Color(254, 254, 254));
        lblNombre1.setText("Forma de pago:");

        cbxTipoCliente.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "COMPRA", "VENDE" }));
        cbxTipoCliente.setOpaque(false);
        cbxTipoCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cbxTipoClienteActionPerformed(evt);
            }
        });

        lblNombre7.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblNombre7.setForeground(new java.awt.Color(254, 254, 254));
        lblNombre7.setText("Cliente que:");

        btnGarante.setText("Garante");
        btnGarante.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGaranteActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panelRound3Layout = new javax.swing.GroupLayout(panelRound3);
        panelRound3.setLayout(panelRound3Layout);
        panelRound3Layout.setHorizontalGroup(
            panelRound3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelRound3Layout.createSequentialGroup()
                .addGap(80, 80, 80)
                .addGroup(panelRound3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(lblNombre1)
                    .addComponent(lblNombre7))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelRound3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(cbxTipoCliente, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(cbxFormaPago, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(31, 31, 31)
                .addComponent(btnGarante, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE)
                .addGap(90, 90, 90))
        );
        panelRound3Layout.setVerticalGroup(
            panelRound3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelRound3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelRound3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cbxTipoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblNombre7))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelRound3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cbxFormaPago, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblNombre1)
                    .addComponent(btnGarante, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(12, Short.MAX_VALUE))
        );

        btnGuardarCliente.setText("Guardar");
        btnGuardarCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGuardarClienteActionPerformed(evt);
            }
        });

        lblNombre8.setFont(new java.awt.Font("GentiumAlt", 1, 12));
        lblNombre8.setForeground(new java.awt.Color(255, 255, 255));
        lblNombre8.setText("Datos de Compra/Venta:");

        lblNombre9.setFont(new java.awt.Font("GentiumAlt", 1, 12));
        lblNombre9.setForeground(new java.awt.Color(255, 255, 255));
        lblNombre9.setText("Datos Personales");

        javax.swing.GroupLayout panelImage2Layout = new javax.swing.GroupLayout(panelImage2);
        panelImage2.setLayout(panelImage2Layout);
        panelImage2Layout.setHorizontalGroup(
            panelImage2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelImage2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelImage2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelImage2Layout.createSequentialGroup()
                        .addGroup(panelImage2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblNombre9)
                            .addComponent(lblNombre8))
                        .addGap(419, 419, 419))
                    .addGroup(panelImage2Layout.createSequentialGroup()
                        .addComponent(btnCancelarCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 302, Short.MAX_VALUE)
                        .addComponent(btnGuardarCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImage2Layout.createSequentialGroup()
                        .addGroup(panelImage2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(panelRound2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(panelRound3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addContainerGap())))
        );
        panelImage2Layout.setVerticalGroup(
            panelImage2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelImage2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblNombre9)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelRound2, javax.swing.GroupLayout.PREFERRED_SIZE, 343, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblNombre8)
                .addGap(7, 7, 7)
                .addComponent(panelRound3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelImage2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnCancelarCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnGuardarCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(17, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout vistaClienteLayout = new javax.swing.GroupLayout(vistaCliente.getContentPane());
        vistaCliente.getContentPane().setLayout(vistaClienteLayout);
        vistaClienteLayout.setHorizontalGroup(
            vistaClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelImage2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        vistaClienteLayout.setVerticalGroup(
            vistaClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelImage2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        vistaConyuge.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        vistaConyuge.setTitle("Editar Cónyuge");
        vistaConyuge.setAlwaysOnTop(true);
        vistaConyuge.setMinimumSize(new java.awt.Dimension(581, 455));
        vistaConyuge.setResizable(false);

        panelImage3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/eddycar/jproyeddycar/negocio/Imagenes/pantalla.jpg"))); // NOI18N

        spEdadC.setOpaque(false);
        spEdadC.setValue(18);

        txttelCelC.setDisabledTextColor(new java.awt.Color(0, 0, 0));

        lblTelfCel1.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblTelfCel1.setForeground(new java.awt.Color(255, 255, 255));
        lblTelfCel1.setText("Celular:");

        txtTelDomC.setDisabledTextColor(new java.awt.Color(0, 0, 0));

        cbEstadoCivilC.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "CASADO" }));
        cbEstadoCivilC.setEnabled(false);
        cbEstadoCivilC.setOpaque(false);

        lblApellido2.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblApellido2.setForeground(new java.awt.Color(255, 255, 255));
        lblApellido2.setText("Edad:");

        txtDirecTrabC.setDisabledTextColor(new java.awt.Color(0, 0, 0));

        txtDirecC.setDisabledTextColor(new java.awt.Color(0, 0, 0));

        lblDireccion1.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblDireccion1.setForeground(new java.awt.Color(254, 254, 254));
        lblDireccion1.setText("Dirección:");

        lblDirTrab1.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblDirTrab1.setForeground(new java.awt.Color(254, 254, 254));
        lblDirTrab1.setText("Dir. Lugar de Trabajo:");

        lblCedulaNuevo1.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblCedulaNuevo1.setForeground(new java.awt.Color(255, 255, 255));
        lblCedulaNuevo1.setText("Cédula:");

        lblNombre10.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblNombre10.setForeground(new java.awt.Color(255, 255, 255));
        lblNombre10.setText("Nombres:");

        lblNombre2.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblNombre2.setForeground(new java.awt.Color(255, 255, 255));
        lblNombre2.setText("Estado Civil:");

        jLabel17.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel17.setForeground(new java.awt.Color(255, 0, 0));
        jLabel17.setText("*");

        lblApellido3.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblApellido3.setForeground(new java.awt.Color(255, 255, 255));
        lblApellido3.setText("Apellidos:");

        lblTelefonoDom1.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblTelefonoDom1.setForeground(new java.awt.Color(255, 255, 255));
        lblTelefonoDom1.setText("Tel. Domicilio:");

        jLabel11.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel11.setForeground(new java.awt.Color(255, 0, 0));
        jLabel11.setText("*");

        txtApellidoC.setDisabledTextColor(new java.awt.Color(0, 0, 0));

        jLabel32.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel32.setForeground(new java.awt.Color(255, 0, 0));
        jLabel32.setText("*");

        txtCedulaNuevoC.setText("0         ");

        jLabel18.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel18.setForeground(new java.awt.Color(255, 0, 0));
        jLabel18.setText("*");

        jLabel19.setFont(new java.awt.Font("Flubber", 1, 11));
        jLabel19.setForeground(new java.awt.Color(255, 255, 255));
        jLabel19.setText("Campos");

        jLabel20.setFont(new java.awt.Font("Flubber", 1, 11));
        jLabel20.setForeground(new java.awt.Color(255, 255, 255));
        jLabel20.setText("obligatorios.");

        javax.swing.GroupLayout panelRound4Layout = new javax.swing.GroupLayout(panelRound4);
        panelRound4.setLayout(panelRound4Layout);
        panelRound4Layout.setHorizontalGroup(
            panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelRound4Layout.createSequentialGroup()
                .addGroup(panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelRound4Layout.createSequentialGroup()
                        .addGap(118, 118, 118)
                        .addGroup(panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblCedulaNuevo1)
                            .addComponent(lblNombre10)
                            .addComponent(lblApellido3)
                            .addComponent(lblNombre2))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(panelRound4Layout.createSequentialGroup()
                                .addComponent(txtCedulaNuevoC, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(panelRound4Layout.createSequentialGroup()
                                .addGroup(panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(cbEstadoCivilC, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(txtApellidoC, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 264, Short.MAX_VALUE)
                                    .addComponent(txtNombreC, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 264, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel32, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                    .addGroup(panelRound4Layout.createSequentialGroup()
                        .addGap(57, 57, 57)
                        .addGroup(panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(panelRound4Layout.createSequentialGroup()
                                .addGroup(panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(lblDireccion1)
                                    .addComponent(lblTelefonoDom1)
                                    .addComponent(lblDirTrab1))
                                .addGap(2, 2, 2))
                            .addComponent(lblTelfCel1)
                            .addComponent(lblApellido2))
                        .addGroup(panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(panelRound4Layout.createSequentialGroup()
                                .addComponent(jLabel18)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel19)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel20))
                            .addGroup(panelRound4Layout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addGroup(panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtDirecTrabC, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(txtDirecC, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                        .addComponent(txtTelDomC)
                                        .addComponent(txttelCelC, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE))))
                            .addGroup(panelRound4Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(spEdadC, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(12, 12, 12)))
                .addContainerGap(62, Short.MAX_VALUE))
        );
        panelRound4Layout.setVerticalGroup(
            panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelRound4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblCedulaNuevo1)
                    .addComponent(txtCedulaNuevoC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel17))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel32)
                    .addGroup(panelRound4Layout.createSequentialGroup()
                        .addGroup(panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtNombreC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblNombre10))
                        .addGap(6, 6, 6)
                        .addGroup(panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtApellidoC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblApellido3)
                            .addComponent(jLabel11))
                        .addGap(7, 7, 7)
                        .addGroup(panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cbEstadoCivilC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblNombre2))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblApellido2)
                            .addComponent(spEdadC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(9, 9, 9)
                        .addGroup(panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblTelfCel1)
                            .addComponent(txttelCelC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblTelefonoDom1)
                            .addComponent(txtTelDomC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblDireccion1)
                            .addComponent(txtDirecC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtDirecTrabC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblDirTrab1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(panelRound4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel20)
                            .addComponent(jLabel19)
                            .addComponent(jLabel18))
                        .addGap(63, 63, 63))))
        );

        btnCancelarConyuge.setText("Cancelar");
        btnCancelarConyuge.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCancelarConyugeActionPerformed(evt);
            }
        });

        btnGuardarConyuge.setText("Guardar");
        btnGuardarConyuge.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGuardarConyugeActionPerformed(evt);
            }
        });

        lblNombre13.setFont(new java.awt.Font("GentiumAlt", 1, 12));
        lblNombre13.setForeground(new java.awt.Color(255, 255, 255));
        lblNombre13.setText("Datos Personales del Cónyuge");

        javax.swing.GroupLayout panelImage3Layout = new javax.swing.GroupLayout(panelImage3);
        panelImage3.setLayout(panelImage3Layout);
        panelImage3Layout.setHorizontalGroup(
            panelImage3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelImage3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelImage3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelImage3Layout.createSequentialGroup()
                        .addComponent(lblNombre13)
                        .addGap(466, 466, 466))
                    .addGroup(panelImage3Layout.createSequentialGroup()
                        .addGroup(panelImage3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panelImage3Layout.createSequentialGroup()
                                .addComponent(btnCancelarConyuge, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(btnGuardarConyuge, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(panelRound4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addContainerGap())))
        );
        panelImage3Layout.setVerticalGroup(
            panelImage3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelImage3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblNombre13)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelRound4, javax.swing.GroupLayout.PREFERRED_SIZE, 343, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelImage3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnCancelarConyuge, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnGuardarConyuge, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout vistaConyugeLayout = new javax.swing.GroupLayout(vistaConyuge.getContentPane());
        vistaConyuge.getContentPane().setLayout(vistaConyugeLayout);
        vistaConyugeLayout.setHorizontalGroup(
            vistaConyugeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelImage3, javax.swing.GroupLayout.PREFERRED_SIZE, 581, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        vistaConyugeLayout.setVerticalGroup(
            vistaConyugeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelImage3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        vistaGarante.setMinimumSize(new java.awt.Dimension(577, 453));
        vistaGarante.setResizable(false);

        panelImage4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/eddycar/jproyeddycar/negocio/Imagenes/pantalla.jpg"))); // NOI18N

        spEdadG.setOpaque(false);
        spEdadG.setValue(18);

        txttelCelG.setDisabledTextColor(new java.awt.Color(0, 0, 0));

        lblTelfCel2.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblTelfCel2.setForeground(new java.awt.Color(255, 255, 255));
        lblTelfCel2.setText("Celular:");

        txtTelDomG.setDisabledTextColor(new java.awt.Color(0, 0, 0));

        cbEstadoCivilG.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "CASADO" }));
        cbEstadoCivilG.setOpaque(false);

        lblApellido4.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblApellido4.setForeground(new java.awt.Color(255, 255, 255));
        lblApellido4.setText("Edad:");

        txtDirecTrabG.setDisabledTextColor(new java.awt.Color(0, 0, 0));

        txtDirecG.setDisabledTextColor(new java.awt.Color(0, 0, 0));

        lblDireccion2.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblDireccion2.setForeground(new java.awt.Color(254, 254, 254));
        lblDireccion2.setText("Dirección:");

        lblDirTrab2.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblDirTrab2.setForeground(new java.awt.Color(254, 254, 254));
        lblDirTrab2.setText("Dir. Lugar de Trabajo:");

        lblCedulaNuevo2.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblCedulaNuevo2.setForeground(new java.awt.Color(255, 255, 255));
        lblCedulaNuevo2.setText("Cédula:");

        lblNombre11.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblNombre11.setForeground(new java.awt.Color(255, 255, 255));
        lblNombre11.setText("Nombres:");

        jLabel34.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel34.setForeground(new java.awt.Color(255, 0, 0));
        jLabel34.setText("*");

        lblNombre3.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblNombre3.setForeground(new java.awt.Color(255, 255, 255));
        lblNombre3.setText("Estado Civil:");

        jLabel35.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel35.setForeground(new java.awt.Color(255, 0, 0));
        jLabel35.setText("*");

        jLabel22.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel22.setForeground(new java.awt.Color(255, 0, 0));
        jLabel22.setText("*");

        lblApellido5.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblApellido5.setForeground(new java.awt.Color(255, 255, 255));
        lblApellido5.setText("Apellidos:");

        lblTelefonoDom2.setFont(new java.awt.Font("GentiumAlt", 0, 12));
        lblTelefonoDom2.setForeground(new java.awt.Color(255, 255, 255));
        lblTelefonoDom2.setText("Tel. Domicilio:");

        jLabel23.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel23.setForeground(new java.awt.Color(255, 0, 0));
        jLabel23.setText("*");

        jLabel24.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel24.setForeground(new java.awt.Color(255, 0, 0));
        jLabel24.setText("*");

        txtApellidoG.setDisabledTextColor(new java.awt.Color(0, 0, 0));

        jLabel36.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel36.setForeground(new java.awt.Color(255, 0, 0));
        jLabel36.setText("*");

        txtCedulaG.setText("0         ");

        jLabel37.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel37.setForeground(new java.awt.Color(255, 0, 0));
        jLabel37.setText("*");

        jLabel38.setFont(new java.awt.Font("Flubber", 1, 11));
        jLabel38.setForeground(new java.awt.Color(255, 255, 255));
        jLabel38.setText("Campos");

        jLabel39.setFont(new java.awt.Font("Flubber", 1, 11));
        jLabel39.setForeground(new java.awt.Color(255, 255, 255));
        jLabel39.setText("obligatorios.");

        javax.swing.GroupLayout panelRound5Layout = new javax.swing.GroupLayout(panelRound5);
        panelRound5.setLayout(panelRound5Layout);
        panelRound5Layout.setHorizontalGroup(
            panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelRound5Layout.createSequentialGroup()
                .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelRound5Layout.createSequentialGroup()
                        .addGap(118, 118, 118)
                        .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblCedulaNuevo2)
                            .addComponent(lblNombre11)
                            .addComponent(lblApellido5)
                            .addComponent(lblNombre3))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(panelRound5Layout.createSequentialGroup()
                                .addComponent(txtCedulaG, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel22, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(panelRound5Layout.createSequentialGroup()
                                .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panelRound5Layout.createSequentialGroup()
                                        .addComponent(cbEstadoCivilG, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(2, 2, 2)
                                        .addComponent(jLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(txtApellidoG, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 264, Short.MAX_VALUE)
                                    .addComponent(txtNombreG, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 264, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel36, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                    .addGroup(panelRound5Layout.createSequentialGroup()
                        .addGap(57, 57, 57)
                        .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(panelRound5Layout.createSequentialGroup()
                                .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(lblDireccion2)
                                    .addComponent(lblTelefonoDom2)
                                    .addComponent(lblDirTrab2))
                                .addGap(2, 2, 2))
                            .addComponent(lblTelfCel2)
                            .addComponent(lblApellido4))
                        .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(panelRound5Layout.createSequentialGroup()
                                .addComponent(jLabel37)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel38)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel39))
                            .addGroup(panelRound5Layout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(panelRound5Layout.createSequentialGroup()
                                        .addComponent(txtDirecTrabG, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(2, 2, 2)
                                        .addComponent(jLabel35, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(panelRound5Layout.createSequentialGroup()
                                        .addComponent(txtDirecG, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(2, 2, 2)
                                        .addComponent(jLabel34, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                        .addComponent(txtTelDomG)
                                        .addComponent(txttelCelG, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE))))
                            .addGroup(panelRound5Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(spEdadG, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addContainerGap(62, Short.MAX_VALUE))
        );
        panelRound5Layout.setVerticalGroup(
            panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelRound5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblCedulaNuevo2)
                    .addComponent(txtCedulaG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel22))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel36)
                    .addGroup(panelRound5Layout.createSequentialGroup()
                        .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtNombreG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblNombre11))
                        .addGap(6, 6, 6)
                        .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtApellidoG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblApellido5)
                            .addComponent(jLabel23))
                        .addGap(7, 7, 7)
                        .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cbEstadoCivilG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblNombre3)
                            .addComponent(jLabel24))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblApellido4)
                            .addComponent(spEdadG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(9, 9, 9)
                        .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblTelfCel2)
                            .addComponent(txttelCelG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblTelefonoDom2)
                            .addComponent(txtTelDomG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblDireccion2)
                            .addComponent(jLabel34)
                            .addComponent(txtDirecG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel35)
                                .addComponent(txtDirecTrabG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(lblDirTrab2))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(panelRound5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel39)
                            .addComponent(jLabel38)
                            .addComponent(jLabel37))
                        .addGap(63, 63, 63))))
        );

        btnCancelarGarante.setText("Cancelar");
        btnCancelarGarante.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCancelarGaranteActionPerformed(evt);
            }
        });

        btnGuardarGarante.setText("Guardar");
        btnGuardarGarante.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGuardarGaranteActionPerformed(evt);
            }
        });

        lblNombre14.setFont(new java.awt.Font("GentiumAlt", 1, 12));
        lblNombre14.setForeground(new java.awt.Color(255, 255, 255));
        lblNombre14.setText("Datos Personales del Garante");

        javax.swing.GroupLayout panelImage4Layout = new javax.swing.GroupLayout(panelImage4);
        panelImage4.setLayout(panelImage4Layout);
        panelImage4Layout.setHorizontalGroup(
            panelImage4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelImage4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelImage4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(panelRound5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblNombre14)
                    .addGroup(panelImage4Layout.createSequentialGroup()
                        .addComponent(btnCancelarGarante, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 275, Short.MAX_VALUE)
                        .addComponent(btnGuardarGarante, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        panelImage4Layout.setVerticalGroup(
            panelImage4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelImage4Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(lblNombre14)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelRound5, javax.swing.GroupLayout.PREFERRED_SIZE, 350, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelImage4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnCancelarGarante, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnGuardarGarante, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(50, 50, 50))
        );

        javax.swing.GroupLayout vistaGaranteLayout = new javax.swing.GroupLayout(vistaGarante.getContentPane());
        vistaGarante.getContentPane().setLayout(vistaGaranteLayout);
        vistaGaranteLayout.setHorizontalGroup(
            vistaGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelImage4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        vistaGaranteLayout.setVerticalGroup(
            vistaGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelImage4, javax.swing.GroupLayout.PREFERRED_SIZE, 423, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Búsqueda de Cliente");
        setAlwaysOnTop(true);
        setModal(true);
        setResizable(false);

        panelImage1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/eddycar/jproyeddycar/negocio/Imagenes/pantalla.jpg"))); // NOI18N

        jLabel21.setFont(new java.awt.Font("Gastada", 1, 24));
        jLabel21.setForeground(new java.awt.Color(255, 255, 255));
        jLabel21.setText("Administración del Cliente");

        jLabel1.setFont(new java.awt.Font("GentiumAlt", 1, 12));
        jLabel1.setForeground(new java.awt.Color(255, 255, 255));
        jLabel1.setText("Bucar Cliente Por:");

        cbxTipo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Cedula", "Nombre o Apellido", "TODOS" }));

        btnBuscarCliente.setText("Buscar");
        btnBuscarCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarClienteActionPerformed(evt);
            }
        });

        btnLimpiar.setText("Limpiar");
        btnLimpiar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLimpiarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panelRound1Layout = new javax.swing.GroupLayout(panelRound1);
        panelRound1.setLayout(panelRound1Layout);
        panelRound1Layout.setHorizontalGroup(
            panelRound1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelRound1Layout.createSequentialGroup()
                .addGap(63, 63, 63)
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelRound1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelRound1Layout.createSequentialGroup()
                        .addComponent(cbxTipo, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(40, 40, 40)
                        .addComponent(btnBuscarCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 49, Short.MAX_VALUE)
                        .addComponent(btnLimpiar, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(txtCriterio, javax.swing.GroupLayout.DEFAULT_SIZE, 417, Short.MAX_VALUE))
                .addGap(71, 71, 71))
        );
        panelRound1Layout.setVerticalGroup(
            panelRound1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelRound1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelRound1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(txtCriterio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelRound1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cbxTipo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnBuscarCliente)
                    .addComponent(btnLimpiar))
                .addContainerGap(22, Short.MAX_VALUE))
        );

        org.jdesktop.beansbinding.ELProperty eLProperty = org.jdesktop.beansbinding.ELProperty.create("${listCliente}");
        org.jdesktop.swingbinding.JTableBinding jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, eLProperty, tblCliente);
        org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${cedula}"));
        columnBinding.setColumnName("Cedula");
        columnBinding.setColumnClass(String.class);
        columnBinding.setEditable(false);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${nombres}"));
        columnBinding.setColumnName("Nombres");
        columnBinding.setColumnClass(String.class);
        columnBinding.setEditable(false);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${apellidos}"));
        columnBinding.setColumnName("Apellidos");
        columnBinding.setColumnClass(String.class);
        columnBinding.setEditable(false);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${telefonoCedlular}"));
        columnBinding.setColumnName("Celular");
        columnBinding.setColumnClass(String.class);
        columnBinding.setEditable(false);
        bindingGroup.addBinding(jTableBinding);
        jTableBinding.bind();
        jScrollPane1.setViewportView(tblCliente);

        btnEditar.setText("Editar");
        btnEditar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEditarActionPerformed(evt);
            }
        });

        btnNuevo.setText("Nuevo");
        btnNuevo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNuevoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panelRect1Layout = new javax.swing.GroupLayout(panelRect1);
        panelRect1.setLayout(panelRect1Layout);
        panelRect1Layout.setHorizontalGroup(
            panelRect1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelRect1Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 547, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelRect1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnNuevo, javax.swing.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE)
                    .addComponent(btnEditar, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        panelRect1Layout.setVerticalGroup(
            panelRect1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelRect1Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(panelRect1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(panelRect1Layout.createSequentialGroup()
                        .addComponent(btnEditar, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnNuevo)))
                .addContainerGap(21, Short.MAX_VALUE))
        );

        btnCerrarVista.setText("Cerrar");
        btnCerrarVista.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCerrarVistaActionPerformed(evt);
            }
        });

        jLabel2.setFont(new java.awt.Font("DejaVu Sans", 1, 13));
        jLabel2.setForeground(new java.awt.Color(254, 254, 254));
        jLabel2.setText("Criterio de Búsqueda");

        jLabel3.setFont(new java.awt.Font("DejaVu Sans", 1, 13));
        jLabel3.setForeground(new java.awt.Color(254, 254, 254));
        jLabel3.setText("Resultado de Búsqueda");

        javax.swing.GroupLayout panelImage1Layout = new javax.swing.GroupLayout(panelImage1);
        panelImage1.setLayout(panelImage1Layout);
        panelImage1Layout.setHorizontalGroup(
            panelImage1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelImage1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelImage1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImage1Layout.createSequentialGroup()
                        .addComponent(jLabel21)
                        .addGap(176, 176, 176))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImage1Layout.createSequentialGroup()
                        .addGroup(panelImage1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(panelRect1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(btnCerrarVista, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(panelRound1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel3)
                            .addComponent(jLabel2))
                        .addContainerGap())))
        );
        panelImage1Layout.setVerticalGroup(
            panelImage1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelImage1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel21)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelRound1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel3)
                .addGap(7, 7, 7)
                .addComponent(panelRect1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnCerrarVista)
                .addGap(18, 18, 18))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelImage1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelImage1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        bindingGroup.bind();

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnBuscarClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarClienteActionPerformed
        try {
            listCliente.clear();
            if (txtCriterio.getText().length() >= 1) {
                if (cbxTipo.getSelectedIndex() == 0) {
                    listCliente.add(clienteUCC.getClienteDao().buscarId(txtCriterio.getText()));
                } else if (cbxTipo.getSelectedIndex() == 1) {
                    listCliente.addAll(clienteUCC.getClienteDao().buscarNombreCliente(txtCriterio.getText()));
                } else {
                    listCliente.addAll(clienteUCC.getClienteDao().buscarTodos());
                }
            } else {
                listCliente.addAll(clienteUCC.getClienteDao().buscarTodos());
            }
            tblCliente.repaint();
        } catch (Exception e) {
        }
    }//GEN-LAST:event_btnBuscarClienteActionPerformed

    private void btnCerrarVistaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCerrarVistaActionPerformed
        this.dispose();
    }//GEN-LAST:event_btnCerrarVistaActionPerformed

private void btnLimpiarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLimpiarActionPerformed
    this.txtCriterio.setText("");
    listCliente.clear();
    tblCliente.repaint();
}//GEN-LAST:event_btnLimpiarActionPerformed

private void btnEditarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditarActionPerformed
    try {
        Cliente cli = new Cliente();
        cli = clienteUCC.getClienteDao().buscarId(tblCliente.getValueAt(tblCliente.getSelectedRow(), 0) + "");
        clienteUCC.setCliente(cli);
        clienteUCC.setClienteRespaldo(cli);
        if (cli.getConyuge() != null) {
            System.out.println("Editar Conyuge");
            clienteUCC.setConyuge(cli.getConyuge());
        }

        System.out.println("Editar");
        if (cli.getGarante() != null) {
            System.out.println("Editar Garante");
            clienteUCC.setGarante(cli.getGarante());
        }
        this.setVisible(false);
        if (cli.getConyuge() != null) {
            btnConyuge.setEnabled(true);
        }
        this.vistaCliente.setAlwaysOnTop(true);
        this.vistaCliente.setLocationRelativeTo(this);
        vistaCliente.setVisible(true);
        limpiarDatosCliente();
        limpiarDatosConyuge();
        limpiarDatosGarante();
        reemplazarCampos();
        this.bandera = true;
    } catch (ArrayIndexOutOfBoundsException e) {
        System.out.println("ERROR " + e);
    }
}//GEN-LAST:event_btnEditarActionPerformed

private void btnNuevoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNuevoActionPerformed
    clienteUCC.setCliente(new Cliente());
    limpiarDatosCliente();
    limpiarDatosConyuge();
    limpiarDatosGarante();
    this.setVisible(false);
    this.vistaCliente.setAlwaysOnTop(true);
    this.vistaCliente.setLocationRelativeTo(this);
    this.vistaCliente.setVisible(true);
    this.bandera = false;
}//GEN-LAST:event_btnNuevoActionPerformed

private void cbxTipoClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbxTipoClienteActionPerformed
    if (cbxTipoCliente.getSelectedIndex() == 0) {
        cbxFormaPago.setEnabled(true);
        cbxFormaPago.setEnabled(true);
        btnGarante.setEnabled(true);
        cbxFormaPago.setSelectedIndex(0);
    } else {
        cbxFormaPago.setEnabled(false);
        btnGarante.setEnabled(false);
        cbxFormaPago.setSelectedIndex(1);
    }
}//GEN-LAST:event_cbxTipoClienteActionPerformed

private void btnConyugeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnConyugeActionPerformed
    this.vistaCliente.setVisible(false);
    this.vistaConyuge.setLocationRelativeTo(this);
    this.vistaConyuge.setVisible(true);
    txtDirecTrabC.setText(txtDirecTrab.getText());
    txtDirecC.setText(txtDirec.getText());
    txtTelDomC.setText(txtTelDom.getText());
    txttelCelC.setText(txttelCel.getText());
    if (bandera == false) {
        clienteUCC.setConyuge(new Conyuge());
    } else {
        if (clienteUCC.getCliente().getConyuge() == null) {
            clienteUCC.setConyuge(new Conyuge());
        }
    }
}//GEN-LAST:event_btnConyugeActionPerformed

private void btnCancelarClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelarClienteActionPerformed
    this.vistaCliente.setVisible(false);
    this.setLocationRelativeTo(this);
    this.setVisible(true);
}//GEN-LAST:event_btnCancelarClienteActionPerformed

private void btnGaranteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGaranteActionPerformed
    this.vistaCliente.setVisible(false);
    this.vistaGarante.setLocationRelativeTo(this);
    this.vistaGarante.setVisible(true);
    if (bandera == false) {
        clienteUCC.setGarante(new Garante());
    } else {
        if (clienteUCC.getCliente().getGarante() == null) {
            clienteUCC.setGarante(new Garante());
        }
    }
}//GEN-LAST:event_btnGaranteActionPerformed

private void btnGuardarClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGuardarClienteActionPerformed
    guardarCliente();
    boolean guardar = false;
//    if (cbxFormaPago.getSelectedIndex() == 0 && clienteUCC.getGarante() == null) {
//        JOptionPane.showMessageDialog(this, "Falta Información del Garante");
//    } else {
//        if (cbEstadoCivil.getSelectedIndex() == 1 && clienteUCC.getConyuge() == null) {
//            JOptionPane.showMessageDialog(this, "Falta Información del Cónyuge");
//        } else {
    if (bandera == true) {
        clienteUCC.getClienteDao().eliminar(clienteUCC.getClienteRespaldo());
    }
    if (txtCedulaNuevo.getText().isEmpty() != true && txtNombre.getText().isEmpty() != true && txtApellido.getText().isEmpty() != true && txtDirec.getText().isEmpty() != true && txtDirecTrab.getText().isEmpty() != true) {
        if (clienteUCC.getCliente().verificaCedulaRuc(txtCedulaNuevo.getText().toString()) == true) {
            if ((clienteUCC.existeConyuge(clienteUCC.getConyuge()) == false && clienteUCC.existeGarante(clienteUCC.getGarante()) == false)) {
                try {
                    System.out.println("Nuevo");
                    clienteUCC.guardar(clienteUCC.getCliente());
                    guardar = true;
                    limpiarDatosCliente();
                    this.vistaCliente.setVisible(false);
                    JOptionPane.showMessageDialog(this, "Cliente Guardado");
                    this.setLocationRelativeTo(this);
                    this.dispose();
                } catch (Exception e) {
                    vistaCliente.setVisible(false);
                    JOptionPane.showMessageDialog(this, "El cliente ya existe.");
                    vistaCliente.setVisible(true);
                }
            } else {
                vistaCliente.setVisible(false);
                if (clienteUCC.existeConyuge(clienteUCC.getConyuge()) == true) {
                    JOptionPane.showMessageDialog(this, "El Cónyuge ya existe.");
                }
                if (clienteUCC.existeGarante(clienteUCC.getGarante()) == true) {
                    JOptionPane.showMessageDialog(this, "El Garante ya existe.");
                }
                vistaCliente.setVisible(true);
            }
        } else {
            vistaCliente.setVisible(false);
            JOptionPane.showMessageDialog(this, "Cédula Incorrecta", "Error de Datos", JOptionPane.ERROR_MESSAGE);
            txtCedulaNuevo.setText("");
            vistaCliente.setVisible(true);
        }
    } else {
        vistaCliente.setVisible(false);
        JOptionPane.showMessageDialog(this, "Falta/n campo/s obligatrios", "Error de Datos", JOptionPane.ERROR_MESSAGE);
        vistaCliente.setVisible(true);
    }
//            if (bandera == true) {
//                if (guardar == false) {
//                    clienteUCC.getClienteDao().guardar(clienteUCC.getClienteRespaldo());
//                }
//            }

//        }

//    }

}//GEN-LAST:event_btnGuardarClienteActionPerformed

private void btnCancelarConyugeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelarConyugeActionPerformed
    this.vistaConyuge.setVisible(false);
    this.vistaCliente.setLocationRelativeTo(this);
    this.vistaCliente.setVisible(true);
}//GEN-LAST:event_btnCancelarConyugeActionPerformed

private void btnGuardarConyugeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGuardarConyugeActionPerformed
    if (txtCedulaNuevoC.getText().isEmpty() != true && txtNombreC.getText().isEmpty() != true && txtApellidoC.getText().isEmpty() != true) {
        if (clienteUCC.getCliente().verificaCedulaRuc(txtCedulaNuevoC.getText().toString()) == true) {
            guardarConyuge();
//            clienteUCC.setConyuge(new Conyuge(txtCedulaNuevoC.getText(), txtNombreC.getText(), txtApellidoC.getText(), EstadoCivil.valueOf(cbEstadoCivilC.getSelectedItem().toString()), txtTelDomC.getText(), txttelCelC.getText(), txtDirecC.getText(), txtDirecTrabC.getText(), (Integer) spEdadC.getValue()));
            this.vistaCliente.setLocationRelativeTo(this);
            this.vistaCliente.setVisible(true);
            this.vistaConyuge.setVisible(false);
        } else {
            JOptionPane.showMessageDialog(this, "Cédula Inválida", "Error de Datos", JOptionPane.ERROR_MESSAGE);
        }
    } else {
        JOptionPane.showMessageDialog(this, "Falta/n campo/s obligatrios", "Error de Datos", JOptionPane.ERROR_MESSAGE);
    }
}//GEN-LAST:event_btnGuardarConyugeActionPerformed

private void btnCancelarGaranteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelarGaranteActionPerformed
    this.vistaGarante.setVisible(false);
    this.vistaCliente.setLocationRelativeTo(this);
    this.vistaCliente.setVisible(true);
}//GEN-LAST:event_btnCancelarGaranteActionPerformed

private void btnGuardarGaranteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGuardarGaranteActionPerformed
    if (txtCedulaG.getText().isEmpty() != true && txtNombreG.getText().isEmpty() != true && txtApellidoG.getText().isEmpty() != true && txtDirecG.getText().isEmpty() != true && txtDirecTrabG.getText().isEmpty() != true) {
        if (clienteUCC.getCliente().verificaCedulaRuc(txtCedulaG.getText().toString()) == true) {
            guardarGarante();
            this.vistaCliente.setLocationRelativeTo(this);
            this.vistaCliente.setVisible(true);
            this.vistaGarante.setVisible(false);
        } else {
            JOptionPane.showMessageDialog(this, "Cédula Inválida", "Error de Datos", JOptionPane.ERROR_MESSAGE);
        }
    } else {
        JOptionPane.showMessageDialog(this, "Falta/n campo/s obligatrios", "Error de Datos", JOptionPane.ERROR_MESSAGE);
    }

}//GEN-LAST:event_btnGuardarGaranteActionPerformed

private void cbEstadoCivilActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbEstadoCivilActionPerformed
    if (cbEstadoCivil.getSelectedItem().toString().equals("CASADO")) {
        txtDirecTrabC.setText(txtDirecTrab.getText());
        txtDirecC.setText(txtDirec.getText());
        txtTelDomC.setText(txtTelDom.getText());
        txttelCelC.setText(txttelCel.getText());
        btnConyuge.setEnabled(true);
    } else {
        btnConyuge.setEnabled(false);

    }
}//GEN-LAST:event_cbEstadoCivilActionPerformed

private void cbxFormaPagoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbxFormaPagoActionPerformed
    if (cbxFormaPago.getSelectedIndex() == 0) {
        btnGarante.setEnabled(true);
    } else {
        btnGarante.setEnabled(false);
        cbxFormaPago.setSelectedItem(1);
    }
}//GEN-LAST:event_cbxFormaPagoActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnBuscarCliente;
    private javax.swing.JButton btnCancelarCliente;
    private javax.swing.JButton btnCancelarConyuge;
    private javax.swing.JButton btnCancelarGarante;
    private javax.swing.JButton btnCerrarVista;
    private javax.swing.JButton btnConyuge;
    private javax.swing.JButton btnEditar;
    private javax.swing.JButton btnGarante;
    private javax.swing.JButton btnGuardarCliente;
    private javax.swing.JButton btnGuardarConyuge;
    private javax.swing.JButton btnGuardarGarante;
    private javax.swing.JButton btnLimpiar;
    private javax.swing.JButton btnNuevo;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JComboBox cbEstadoCivil;
    private javax.swing.JComboBox cbEstadoCivilC;
    private javax.swing.JComboBox cbEstadoCivilG;
    private javax.swing.JComboBox cbxFormaPago;
    private javax.swing.JComboBox cbxTipo;
    private javax.swing.JComboBox cbxTipoCliente;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lblApellido;
    private javax.swing.JLabel lblApellido1;
    private javax.swing.JLabel lblApellido2;
    private javax.swing.JLabel lblApellido3;
    private javax.swing.JLabel lblApellido4;
    private javax.swing.JLabel lblApellido5;
    private javax.swing.JLabel lblCedulaNuevo;
    private javax.swing.JLabel lblCedulaNuevo1;
    private javax.swing.JLabel lblCedulaNuevo2;
    private javax.swing.JLabel lblDirTrab;
    private javax.swing.JLabel lblDirTrab1;
    private javax.swing.JLabel lblDirTrab2;
    private javax.swing.JLabel lblDireccion;
    private javax.swing.JLabel lblDireccion1;
    private javax.swing.JLabel lblDireccion2;
    private javax.swing.JLabel lblNombre;
    private javax.swing.JLabel lblNombre1;
    private javax.swing.JLabel lblNombre10;
    private javax.swing.JLabel lblNombre11;
    private javax.swing.JLabel lblNombre13;
    private javax.swing.JLabel lblNombre14;
    private javax.swing.JLabel lblNombre2;
    private javax.swing.JLabel lblNombre3;
    private javax.swing.JLabel lblNombre6;
    private javax.swing.JLabel lblNombre7;
    private javax.swing.JLabel lblNombre8;
    private javax.swing.JLabel lblNombre9;
    private javax.swing.JLabel lblTelefonoDom;
    private javax.swing.JLabel lblTelefonoDom1;
    private javax.swing.JLabel lblTelefonoDom2;
    private javax.swing.JLabel lblTelfCel;
    private javax.swing.JLabel lblTelfCel1;
    private javax.swing.JLabel lblTelfCel2;
    private org.edisoncor.gui.panel.PanelImage panelImage1;
    private org.edisoncor.gui.panel.PanelImage panelImage2;
    private org.edisoncor.gui.panel.PanelImage panelImage3;
    private org.edisoncor.gui.panel.PanelImage panelImage4;
    private org.edisoncor.gui.panel.PanelRect panelRect1;
    private org.edisoncor.gui.panel.PanelRound panelRound1;
    private org.edisoncor.gui.panel.PanelRound panelRound2;
    private org.edisoncor.gui.panel.PanelRound panelRound3;
    private org.edisoncor.gui.panel.PanelRound panelRound4;
    private org.edisoncor.gui.panel.PanelRound panelRound5;
    private javax.swing.JSpinner spEdad;
    private javax.swing.JSpinner spEdadC;
    private javax.swing.JSpinner spEdadG;
    private javax.swing.JTable tblCliente;
    private javax.swing.JTextField txtApellido;
    private javax.swing.JTextField txtApellidoC;
    private javax.swing.JTextField txtApellidoG;
    private javax.swing.JFormattedTextField txtCedulaG;
    private javax.swing.JFormattedTextField txtCedulaNuevo;
    private javax.swing.JFormattedTextField txtCedulaNuevoC;
    private javax.swing.JTextField txtCriterio;
    private javax.swing.JTextField txtDirec;
    private javax.swing.JTextField txtDirecC;
    private javax.swing.JTextField txtDirecG;
    private javax.swing.JTextField txtDirecTrab;
    private javax.swing.JTextField txtDirecTrabC;
    private javax.swing.JTextField txtDirecTrabG;
    private javax.swing.JTextField txtNombre;
    private javax.swing.JTextField txtNombreC;
    private javax.swing.JTextField txtNombreG;
    private javax.swing.JFormattedTextField txtTelDom;
    private javax.swing.JFormattedTextField txtTelDomC;
    private javax.swing.JFormattedTextField txtTelDomG;
    private javax.swing.JFormattedTextField txttelCel;
    private javax.swing.JFormattedTextField txttelCelC;
    private javax.swing.JFormattedTextField txttelCelG;
    private javax.swing.JDialog vistaCliente;
    private javax.swing.JDialog vistaConyuge;
    private javax.swing.JDialog vistaGarante;
    private org.jdesktop.beansbinding.BindingGroup bindingGroup;
    // End of variables declaration//GEN-END:variables
    private List<Cliente> listaClientes = new ArrayList<Cliente>();

    public List<Cliente> getListaClientes() {
        return listaClientes;
    }

    public void setListaClientes(List<Cliente> listaClientes) {
        this.listaClientes = listaClientes;
    }
    ObservableList<Cliente> listCliente = org.jdesktop.observablecollections.ObservableCollections.observableList(listaClientes);

    public ObservableList<Cliente> getListCliente() {
        return listCliente;
    }

    public void setListCliente(ObservableList<Cliente> listCliente) {
        this.listCliente = listCliente;
    }

    public void limpiarDatosConyuge() {
        txtCedulaNuevoC.setText("");
        txtApellidoC.setText("");
        txtNombreC.setText("");
        txtDirecC.setText("");
        txtDirecTrabC.setText("");
        txtTelDomC.setText("");
        txttelCelC.setText("");
        spEdadC.setValue(18);
        cbEstadoCivilC.setSelectedItem("CASADO");
    }

    private void limpiarDatosCliente() {
        txtCedulaNuevo.setText("");
        txtApellido.setText("");
        txtNombre.setText("");
        txtDirec.setText("");
        txtDirecTrab.setText("");
        txtTelDom.setText("");
        txttelCel.setText("");
        spEdad.setValue(18);
        cbEstadoCivil.setSelectedItem("SOLTERO");
    }

    private void limpiarDatosGarante() {
        txtCedulaG.setText("");
        txtApellidoG.setText("");
        txtNombreG.setText("");
        txtDirecG.setText("");
        txtDirecTrabG.setText("");
        txtTelDomG.setText("");
        txttelCelG.setText("");
        spEdadG.setValue(18);
        cbEstadoCivilG.setSelectedItem("SOLTERO");
    }

    private void camposCliente(boolean b) {
        txtApellido.setEnabled(b);
        txtNombre.setEditable(b);
        txtDirec.setEnabled(b);
        txtDirecTrab.setEnabled(b);
        txtTelDom.setEnabled(b);
        txttelCel.setEnabled(b);
        cbEstadoCivil.setEnabled(b);
        spEdad.setEnabled(b);
        cbxTipoCliente.setEnabled(b);
    }

    private void reemplazarCampos() {
        Cliente cli = clienteUCC.getCliente();
        txtApellido.setText(cli.getApellidos());
        txtCedulaNuevo.setText(cli.getCedula());
        txttelCel.setText(cli.getTelefonoCedlular());
        txtDirec.setText(cli.getDireccionDomicilio());
        txtDirecTrab.setText(cli.getDireccionTrabajo());
        spEdad.setValue(cli.getEdad());
        cbEstadoCivil.setSelectedItem(String.valueOf(cli.getEstado()));
        txtNombre.setText(cli.getNombres());
        txtTelDom.setText(cli.getTelefonoDomicilio());
        if (cli.getConyuge() != null) {
            txtApellidoC.setText(cli.getConyuge().getApellidos());
            txtCedulaNuevoC.setText(cli.getConyuge().getCedula());
            txttelCelC.setText(cli.getConyuge().getTelefonoCedlular());
            txtDirecC.setText(cli.getConyuge().getDireccionDomicilio());
            txtDirecTrabC.setText(cli.getConyuge().getDireccionTrabajo());
            spEdadC.setValue(cli.getConyuge().getEdad());
            cbEstadoCivilC.setSelectedItem(String.valueOf(cli.getConyuge().getEstado()));
            txtNombreC.setText(cli.getConyuge().getNombres());
            txtTelDomC.setText(cli.getConyuge().getTelefonoDomicilio());
            System.out.println("CONYUGE");
        }
        if (clienteUCC.getGarante() != null) {
            txtApellidoG.setText(cli.getGarante().getApellidos());
            txtCedulaG.setText(cli.getGarante().getCedula());
            txttelCelG.setText(cli.getGarante().getTelefonoCedlular());
            txtDirecG.setText(cli.getGarante().getDireccionDomicilio());
            txtDirecTrabG.setText(cli.getGarante().getDireccionTrabajo());
            spEdadG.setValue(cli.getGarante().getEdad());
            cbEstadoCivilG.setSelectedItem(String.valueOf(cli.getGarante().getEstado()));
            txtNombreG.setText(cli.getGarante().getNombres());
            txtTelDomG.setText(cli.getGarante().getTelefonoDomicilio());
            System.out.println("GARANTE");
        }
        cbxTipoCliente.setSelectedItem(cli.getTipoCliente());
        if (cli.getGarante() == null) {
            cbxFormaPago.setSelectedIndex(1);
        } else {
            cbxFormaPago.setSelectedIndex(0);
        }
    }

    private void guardarConyuge() {
        if (bandera == false || clienteUCC.getConyuge() == null) {
            clienteUCC.setConyuge(new Conyuge());
            System.out.println("Guardar Conyuge Nuevo");
        }
        System.out.println("Guardar Conyuge");
        clienteUCC.getConyuge().setCedula(txtCedulaNuevoC.getText());
        clienteUCC.getConyuge().setNombres(txtNombreC.getText());
        clienteUCC.getConyuge().setApellidos(txtApellidoC.getText());
        clienteUCC.getConyuge().setEstado(EstadoCivil.valueOf(cbEstadoCivilC.getSelectedItem().toString()));
        clienteUCC.getConyuge().setTelefonoDomicilio(txtTelDomC.getText());
        clienteUCC.getConyuge().setTelefonoCedlular(txttelCelC.getText());
        clienteUCC.getConyuge().setDireccionTrabajo(txtDirecC.getText());
        clienteUCC.getConyuge().setDireccionTrabajo(txtDirecTrabC.getText());
        clienteUCC.getConyuge().setEdad((Integer) spEdadC.getValue());
    }

    private void guardarCliente() {
        clienteUCC.getCliente().setCedula(txtCedulaNuevo.getText());
        clienteUCC.getCliente().setNombres(txtNombre.getText());
        clienteUCC.getCliente().setApellidos(txtApellido.getText());
        clienteUCC.getCliente().setEstado(EstadoCivil.valueOf(cbEstadoCivil.getSelectedItem().toString()));
        clienteUCC.getCliente().setTelefonoDomicilio(txtTelDom.getText());
        clienteUCC.getCliente().setTelefonoCedlular(txttelCel.getText());
        clienteUCC.getCliente().setDireccionDomicilio(txtDirec.getText());
        clienteUCC.getCliente().setDireccionTrabajo(txtDirecTrab.getText());
        clienteUCC.getCliente().setEdad((Integer) spEdad.getValue());
        clienteUCC.getCliente().setTipoCliente(cbxTipoCliente.getSelectedItem().toString());
        clienteUCC.getCliente().setConyuge(clienteUCC.getConyuge());
        clienteUCC.getCliente().setGarante(clienteUCC.getGarante());

    }

    private void guardarGarante() {
        if (bandera == false || clienteUCC.getGarante() == null) {
            clienteUCC.setGarante(new Garante());
        }
        clienteUCC.getGarante().setCedula(txtCedulaG.getText());
        clienteUCC.getGarante().setNombres(txtNombreG.getText());
        clienteUCC.getGarante().setApellidos(txtApellidoG.getText());
        clienteUCC.getGarante().setEstado(EstadoCivil.valueOf(cbEstadoCivilG.getSelectedItem().toString()));
        clienteUCC.getGarante().setTelefonoDomicilio(txtTelDomG.getText());
        clienteUCC.getGarante().setTelefonoCedlular(txttelCelG.getText());
        clienteUCC.getGarante().setDireccionDomicilio(txtDirecG.getText());
        clienteUCC.getGarante().setDireccionTrabajo(txtDirecTrabG.getText());
        clienteUCC.getGarante().setEdad((Integer) spEdadG.getValue());
    }
}
